function getQuarter(currMonth) {
  return (currQuarter = Math.floor(
    currMonth.split("-")[1] % 3 == 0
      ? currMonth.split("-")[1] / 3
      : currMonth.split("-")[1] / 3 + 1
  ));
}
console.log(getQuarter("2020-09-27"));
